<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>店铺信息</title>
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="fonts/glyphicons-halflings-regular.woff2">
    <style>
        .avatar {
            /*margin-top: 15px;*/
            /*margin-left: 5px;*/
            display: inline-block;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            border: 2px solid #ccc;
            box-shadow: 0 0 5px #ccc;
        }
        input[type="text"] {
            margin-top: 15px;
            width: 300px;
            height: 25px;
            border: none;
            color: #2e6da4;
            font-size: 20px;
        }
    </style>
</head>
<body>
<div id="top"></div>
<div class="container" style="margin-top: 7.5%;margin-left: 30%">
    <div class="col-xs-6 col-md-6">-->
        <div class="panel panel-default" style="height: 560px">
            <div class="panel-heading">店铺信息</div>
            <div class="panel-body" style="padding-left: 15%">
                <div>店铺照片:&nbsp;&nbsp;&nbsp;<img id="headPhoto" class="avatar" src="" alt="头像"></div>
                <div>店铺名称&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;<label for="name"></label><input id="name" type="text" readonly></div>
                <br>
                <div>店铺邮箱:&nbsp;&nbsp;&nbsp;<label for="email"></label><input id="email" type="text" readonly></div>
                <br>
                <div>账户余额:&nbsp;&nbsp;&nbsp;<label for="email"></label><input id="balance" type="text" readonly></div>
            </div>
        </div>
    </div>
</div>
</div>

<script type="text/javascript" src="js/jquery-3.6.4.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#top").load("top2.html")
        $.ajax({
            url: "/PDD/user?method=getUserInfo",
            type: "GET",
            dataType: "json",
            success: function (data) {
                let shop=data.data[0]
                $("#headPhoto").attr("src","image/"+shop.headPhoto)
                $("#name").val(shop.username)
                $("#email").val(shop.email)
                $("#balance").val(shop.balance.toFixed(2))
            }
        })
    })
</script>
</body>
</html>